﻿namespace StackDeck.ViewModels
{
    using Caliburn.Micro;

    using StackDeck.Model;

    public class CoreTopUsersViewModel : Column
    {
        private readonly IStackOverflowRepository stackOverflowRepository;

        public BindableCollection<User> Users { get; set; }

        public CoreTopUsersViewModel(IStackOverflowRepository stackOverflowRepository)
        {
            this.stackOverflowRepository = stackOverflowRepository;

            this.Header = "Top Users";

            this.Users = new BindableCollection<User>(this.stackOverflowRepository.GetTopUsers(50));
        }
    }
}